Package com.cisco.pt.ipc.sim.impl
Class DNSServerProcessImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.DNSServerProcessImpl
- All Implemented Interfaces:
IPCObject,DNSServerProcess,Process
Information provided by the PKI file:
\class DnsServerProcess
\brief DnsServerProcess is the process that stores DNS records and resolves domain names and hostnames into IP addresses.
\example network().getDevice("Server0").getProcess("DnsServer")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionDNSServerProcessImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddARecordToNameServerDb(String domainName, String address) Information provided by the PKI file:booleanaddCNAMEToNameServerDb(String domainName, String hostName) Information provided by the PKI file:booleanaddIpAddress(String hostname, IPAddress ipAddress) Information provided by the PKI file:booleanaddNSRecordToNameServerDb(String domainName, String serverName) Information provided by the PKI file:booleanaddSOAToNameServerDb(String domainName, String serverName, String mailbox, String minTtl, String refresh, String retry, String expiry) Information provided by the PKI file:getARecordWithAddress(String domainName, IPAddress address) Information provided by the PKI file:getCNameRecordWithHostname(String domainName, String hostName) Information provided by the PKI file:getEntryAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:getIpAddOfDomain(String domainName) Information provided by the PKI file:Information provided by the PKI file:getNSRecordWithServerName(String domainName, String serverName) Information provided by the PKI file:intInformation provided by the PKI file:getRrFromNameServerDbAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:getSOARecordWithMailbox(String domainName, String mailbox) Information provided by the PKI file:booleanisDomainNameExisted(String domainName) Information provided by the PKI file:booleanInformation provided by the PKI file:booleanisValidName(String hostname) Information provided by the PKI file:booleanremoveARecordFromNameServerDb(String domainName, String address) Information provided by the PKI file:booleanremoveCNAMEFromNameServerDb(String domainName, String hostName) Information provided by the PKI file:voidremoveIpAddress(String hostname) Information provided by the PKI file:booleanremoveNSRecordFromNameServerDb(String domainName, String serverName) Information provided by the PKI file:booleanremoveSOAFromNameServerDb(String domainName, String mailbox) Information provided by the PKI file:voidsetEnable(boolean bEnable) Information provided by the PKI file:voidsetPortNumber(int num) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
DNSServerProcessImpl
public DNSServerProcessImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
addIpAddress
Information provided by the PKI file:
\brief Adds a DNS record with the specified hostname and IP address. \param hostname, the hostname of the DNS record. \param ipAddress, the IP address of the DNS record. \return bool, true if successful, otherwise false.- Specified by:
addIpAddressin interfaceDNSServerProcess- Parameters:
hostname- Takes in a parameter of hostnameipAddress- Takes in a parameter of ipAddress- Returns:
- boolean Returns a boolean
-
removeIpAddress
Information provided by the PKI file:
\brief Removes the DNS record with the associated hostname. \param hostname, the hostname of the DNS record of interest.- Specified by:
removeIpAddressin interfaceDNSServerProcess- Parameters:
hostname- Takes in a parameter of hostname
-
getEntryAt
Information provided by the PKI file:
\Returns the hostname and IP address of the DNS record at the specified index. \param index, the DNS record index of interest. \return pair<string, ip>, the hostname and IP address of the DNS record at the specified index.- Specified by:
getEntryAtin interfaceDNSServerProcess- Parameters:
index- Takes in a parameter of index- Returns:
- Pair<String, IPAddress> Returns a Pair<String, IPAddress>
-
getEntryCount
public int getEntryCount()Information provided by the PKI file:
\brief Returns the number of DNS records. \return int, the number of DNS records.- Specified by:
getEntryCountin interfaceDNSServerProcess- Returns:
- int Returns a int
-
isValidName
Information provided by the PKI file:
\brief Returns true if the specified hostname is a valid name (non-special characters), otherwise false. \param hostname, the hostname of interest. \return bool, true if the specified hostname is a valid name (non-special characters), otherwise false.- Specified by:
isValidNamein interfaceDNSServerProcess- Parameters:
hostname- Takes in a parameter of hostname- Returns:
- boolean Returns a boolean
-
setEnable
public void setEnable(boolean bEnable) Information provided by the PKI file:
\brief Enables or disables the DNS server process. \param bEnable, true to enable the DNS server process, false to disable it.- Specified by:
setEnablein interfaceDNSServerProcess- Parameters:
bEnable- Takes in a parameter of bEnable
-
isEnabled
public boolean isEnabled()Information provided by the PKI file:
\brief Returns true if the DNS server process is enabled, otherwise false. \return bool, true if the DNS server process is enabled, otherwise false.- Specified by:
isEnabledin interfaceDNSServerProcess- Returns:
- boolean Returns a boolean
-
setPortNumber
public void setPortNumber(int num) Information provided by the PKI file:
\brief Sets the port number of the DNS service. \param num, the port number to set the DNS service to.- Specified by:
setPortNumberin interfaceDNSServerProcess- Parameters:
num- Takes in a parameter of num
-
getPortNumber
public int getPortNumber()Information provided by the PKI file:
\brief Returns the port number of the DNS service. \return int, the port number of the DNS service.- Specified by:
getPortNumberin interfaceDNSServerProcess- Returns:
- int Returns a int
-
isDomainNameExisted
Information provided by the PKI file:
\brief Returns true if the specified domain name exists, otherwise false. \param domainName, the domain name of interest. \return bool, true if the specified domain name exists, otherwise false.- Specified by:
isDomainNameExistedin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainName- Returns:
- boolean Returns a boolean
-
getIpAddOfDomain
Information provided by the PKI file:
\brief Returns the IP address of the specified domain name. \param domainName, the domain name of interest. \return ip, the IP address of the specified domain name.- Specified by:
getIpAddOfDomainin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainName- Returns:
- IPAddress Returns a IPAddress
-
getARecordWithAddress
Information provided by the PKI file:
\brief Returns the A resource record with the specified parameters. \param domainName, the domain name of the A resource record of interest. \param address, the address of the A resource record of interest. \return DnsRrA, the A resource record object with the specified parameters.- Specified by:
getARecordWithAddressin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNameaddress- Takes in a parameter of address- Returns:
- DNSRrA Returns a DNSRrA
-
getCNameRecordWithHostname
Information provided by the PKI file:
\brief Returns the CNAME resource record with the specified parameters. \param domainName, the domain name of the CNAME resource record of interest. \param hostName, the hostname of the CNAME resource record of interest. \return DnsRrCname, the CNAME resource record object with the specified parameters.- Specified by:
getCNameRecordWithHostnamein interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNamehostName- Takes in a parameter of hostName- Returns:
- DNSRrCname Returns a DNSRrCname
-
getSOARecordWithMailbox
Information provided by the PKI file:
\brief Returns the SOA resource record with the specified parameters. \param domainName, the domain name of the SOA resource record of interest. \param mailbox, the mailbox of the SOA resource record of interest. \return DnsRrSoa, the SOA resource record object with the specified parameters.- Specified by:
getSOARecordWithMailboxin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNamemailbox- Takes in a parameter of mailbox- Returns:
- DNSRrSoa Returns a DNSRrSoa
-
getNSRecordWithServerName
Information provided by the PKI file:
\brief Returns the NS resource record with the specified parameters. \param domainName, the domain name of the NS resource record of interest. \param serverName, the server name of the NS resource record of interest. \return DnsRrNs, the NS resource record object with the specified parameters.- Specified by:
getNSRecordWithServerNamein interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNameserverName- Takes in a parameter of serverName- Returns:
- DNSRrNs Returns a DNSRrNs
-
addARecordToNameServerDb
Information provided by the PKI file:
\brief Returns true if the A resource record was added successfully, otherwise false. \param domainName, the domain name for the A resource record. \param address, the address for the A resource record. \return bool, true if the A resource record was added successfully, otherwise false.- Specified by:
addARecordToNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNameaddress- Takes in a parameter of address- Returns:
- boolean Returns a boolean
-
addCNAMEToNameServerDb
Information provided by the PKI file:
\brief Returns true if the CNAME resource record was added successfully, otherwise false. \param domainName, the domain name for the CNAME resource record. \param hostName, the hostname for the CNAME resource record. \return bool, true if the CNAME resource record was added successfully, otherwise false.- Specified by:
addCNAMEToNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNamehostName- Takes in a parameter of hostName- Returns:
- boolean Returns a boolean
-
addSOAToNameServerDb
public boolean addSOAToNameServerDb(String domainName, String serverName, String mailbox, String minTtl, String refresh, String retry, String expiry) Information provided by the PKI file:
\brief Returns true if the SOA resource record was added successfully, otherwise false. \param domainName, the domain name for the SOA resource record. \param serverName, the primary server name for the SOA resource record. \param mailbox, the mailbox for the SOA resource record. \param minTtl, the minimum TTL for the SOA resource record. \param refresh, the refresh time for the SOA resource record. \param retry, the retry time for the SOA resource record. \param expiry, the expiry time for the SOA resource record. \return bool, true if the CNAME resource record was added successfully, otherwise false.- Specified by:
addSOAToNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNameserverName- Takes in a parameter of serverNamemailbox- Takes in a parameter of mailboxminTtl- Takes in a parameter of minTtlrefresh- Takes in a parameter of refreshretry- Takes in a parameter of retryexpiry- Takes in a parameter of expiry- Returns:
- boolean Returns a boolean
-
addNSRecordToNameServerDb
Information provided by the PKI file:
\brief Returns true if the NS resource record was added successfully, otherwise false. \param domainName, the domain name for the NS resource record. \param serverName, the server name for the NS resource record. \return bool, true if the NS record was added successfully, otherwise false.- Specified by:
addNSRecordToNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNameserverName- Takes in a parameter of serverName- Returns:
- boolean Returns a boolean
-
removeARecordFromNameServerDb
Information provided by the PKI file:
\brief Returns true if the specified A resource record was removed successfully, otherwise false. \param domainName, the domain name of the A resource record of interest. \param address, the address of the A resource record of interest. \return bool, true if the specified A resource record was removed successfully, otherwise false.- Specified by:
removeARecordFromNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNameaddress- Takes in a parameter of address- Returns:
- boolean Returns a boolean
-
removeCNAMEFromNameServerDb
Information provided by the PKI file:
\brief Returns true if the specified CNAME resource record was removed successfully, otherwise false. \param domainName, the domain name of the CNAME resource record of interest. \param hostName, the hostname of the CNAME resource record of interest. \return bool, true if the specified CNAME resource record was removed successfully, otherwise false.- Specified by:
removeCNAMEFromNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNamehostName- Takes in a parameter of hostName- Returns:
- boolean Returns a boolean
-
removeSOAFromNameServerDb
Information provided by the PKI file:
\brief Returns true if the specified SOA resource record was removed successfully, otherwise false. \param domainName, the domain name of the SOA resource record of interest. \param mailbox, the mailbox of the SOA resource record of interest. \return bool, true if the specified SOA resource record was removed successfully, otherwise false.- Specified by:
removeSOAFromNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNamemailbox- Takes in a parameter of mailbox- Returns:
- boolean Returns a boolean
-
removeNSRecordFromNameServerDb
Information provided by the PKI file:
\brief Returns true if the specified NS resource record was removed successfully, otherwise false. \param domainName, the domain name of the NS resource record of interest. \param serverName, the server name of the NS resource record of interest. \return bool, true if the specified NS resource record was removed successfully, otherwise false.- Specified by:
removeNSRecordFromNameServerDbin interfaceDNSServerProcess- Parameters:
domainName- Takes in a parameter of domainNameserverName- Takes in a parameter of serverName- Returns:
- boolean Returns a boolean
-
getSizeOfNameServerDb
public int getSizeOfNameServerDb()Information provided by the PKI file:
\brief Returns the size of the name server database. \return int, the size of the name server database.- Specified by:
getSizeOfNameServerDbin interfaceDNSServerProcess- Returns:
- int Returns a int
-
getRrFromNameServerDbAt
Information provided by the PKI file:
\brief Returns the resource record at the specified index. \param index, the index of the resource record of interest. \return DnsResourceRecord, the resource record DnsResourceRecord object at the specified index.- Specified by:
getRrFromNameServerDbAtin interfaceDNSServerProcess- Parameters:
index- Takes in a parameter of index- Returns:
- DNSResourceRecord Returns a DNSResourceRecord
-
getMatchingRRsFromCache
Information provided by the PKI file:
\brief Returns the resource record associated with the resource record name. \param name, the name of the resource record of interest. \return DnsResourceRecord, the resource record DnsResourceRecord object associated with the resource record name.- Specified by:
getMatchingRRsFromCachein interfaceDNSServerProcess- Parameters:
name- Takes in a parameter of name- Returns:
- List<DNSResourceRecord> Returns a List<DNSResourceRecord>
-